home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ 5⁄25⁄90 / 1336-Dismissers & Freeing-May90 < prev    next >
Encoding:
Text File  |  1990-05-25  |  1.2 KB  |  39 lines  |  [TEXT/GEOL]

  1. Item    0312050                         24-May-90        15:37PDT
  2.  
  3. From:   D4695                           Skywalker Sys, Scott Collins,PRT
  4.  
  5. To:     MADA2                           MacApp Dev Assoc, Curtis Faith,IVC
  6.  
  7. cc:     MACAPP.TECH$                    MacApp Technical
  8.  
  9. Sub:    Dismissers & Freeing Subviews
  10.  
  11. Curtis,
  12.  
  13. 1) Dismissers don't 'put away' dialogs.  They never have (either modal or
  14. modeless), any more than choosing the quit item call ExitToShell.
  15. Instead quit sets a semaphore that says 'all done, you clean up and do whatever
  16. you have to'.
  17.     PoseModally uses its semaphore (fDismissed) to note that user has finished
  18. input, it can then do any final validation and finally put the dialog away.
  19. There are many schools of thought on modeless dialogs, whether they can have
  20. buttons that make them go away or if only the close box can do that.  There is
  21. no OK button on a MacWrite document.
  22.  
  23.  
  24. 3) for destroying all subview try this slight modification to what you posted
  25.  
  26.     PROCEDURE RemoveAndFree( aSubView : TView )
  27.       BEGIN
  28.         aSubView.Free;
  29.       END;
  30.  
  31. ...
  32. EachSubView( RemoveAndFree );
  33. ...
  34.  
  35. See the code in TView.Free for an example and further clarification.
  36.  
  37.     -- Scott Collins
  38.  
  39.